#!/usr/bin/env python3

import rospy
from DrRobotController_six_axes_can.msg import set_arm_relative_position
# import DrRobotController_six_axes as dr

def callback(data):
    import DrRobotController_six_axes as dr
    dr.set_arm_relative_position(id_num=data.id_num, pl_temp=data.pl_temp, speed=data.speed, acceleration=data.acceleration)
    rospy.loginfo("set_arm_relative_position_node")


def listener():
    rospy.init_node("set_arm_relative_position", anonymous=True)
    rospy.Subscriber("set_arm_relative_position", set_arm_relative_position, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

